<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>预安置人员核查——查看</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/default.css" rel="stylesheet" type="text/css" />
    <link href="/webjars/miniui/frame/tabs.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="mini-toolbar" style="padding:2px;" align="right">
    <input name="priNum" id="priNum" class="mini-hidden" style="width: 100%" readonly />
    <input name="id" id="id" class="mini-hidden" style="width: 100%" readonly />
</div>
<div class="mini-tabs" style="width:100%;height: 100%" id="tabs" onbeforeactivechanged="onClickTo(e)" plain="false">
    <div title="基本信息" style="height: 100%;width: 100%"></div>
    <div title="服刑信息" style="height: 100%;width: 100%"></div>
    <div title="社会关系" style="height: 100%;width: 100%"></div>
</div>

<script type="text/javascript">
    mini.parse();
    var id = mini.get("id");
    var priNum = mini.get("priNum");
    var tabs = mini.get("tabs");

    function getMainValue(data) {
        id.setValue(data.id);
        priNum.setValue(data.priNum);
    }

    function setChildValue(e) {
        return {id: id.getValue(), priNum: priNum.getValue()};
    }

    function onClickTo(e) {
        var pristr = priNum.getValue();
        var tabName = e.tab.title;
        if ("服刑信息" == tabName) {
            e.tab.url = "/azbj/inmates/termeditlook/viewexcel?prinum=" + pristr;
        } else if ("社会关系" == tabName) {
            e.tab.url = "/azbj/social-relationslook/viewexcel?prinum=" + pristr;
        }
    }

    function initTab() {
        tabs.activeTab(0);
        tabs.loadTab("/azbj/inmates/baseinfolook/viewexcel?prinum=" + ${prinum!''});
    }

    window.onload = function (e) {
        priNum.setValue(${prinum!''});
        id.setValue(${id!''});
        initTab();
    }
</script>
</body>
</html>